From ae49405f1ecdff19a125048827b18029989421a9 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 6 Aug 2025 15:06:25 +0200 Subject: [PATCH] deploy: Remove some dead aboot code The code in get_kernel_from_tree_usrlib_modules() that checks for an "aboot.cfg" does nothing with it (and in fact may leak the fd in case its there). In practice, /usr/lib/modules never has an aboot.cfg, so this is just completely dead code. Signed-off-by: Alexander Larsson --- src/libostree/ostree-sysroot-deploy.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index e8f3ece5..6cb6dd53 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -1211,10 +1211,6 @@ get_kernel_from_tree_usrlib_modules (OstreeSysroot *sysroot, int deployment_dfd, } glnx_close_fd (&fd); - /* look for a aboot.cfg file. */ - if (!ot_openat_ignore_enoent (ret_layout->boot_dfd, "aboot.cfg", &fd, error)) - return FALSE; - /* Testing aid for https://github.com/ostreedev/ostree/issues/2154 */ const gboolean no_dtb = (sysroot->debug_flags & OSTREE_SYSROOT_DEBUG_TEST_NO_DTB) > 0; if (!no_dtb) -- 2.30.2